A system architecture for massive highly-concurrent Internet services mainly has several core focuses: performance, availability, scalability, and extensibility. To achieve system design objectives of the focuses, multiple database technologies such as an in-memory database, a relational database, and a not only structured query language (NoSQL) are usually introduced to a data layer. The NoSQL generally refers to a non-relational database, and an in-memory database includes products such as TT (TimesTen) produced by Oracle.
To ensure security and performance indicators, various databases usually set an upper limit of an indicator for a single node, for example, an upper limit of a quantity of database connections. TimesTen supports 2048 connections at most, and an Oracle (a relational database) database can support a relatively large quantity of connections. However, as a quantity of database connections increases, an Oracle database responds less quickly. Therefore, to ensure performance, the Oracle database also has a bottleneck in the quantity of database connections.
As services develop to be complex and diversified, with reference to development of distributed deployment of databases, a relationship between applications and databases has the following characteristics:
1. Databases of multiple types such as a relational database, an in-memory database, and an NoSQL coexist. Typical products are, for example, Oracle, TimesTen, Fastore, and Hadoop.
2. To adapt to clustering and high feasibility of applications, databases are usually deployed at multiple partition nodes in a partition division manner, providing capabilities of high-concurrency and high-availability.
3. Because applications become increasingly complex, one application may need to simultaneously access multiple types of databases and multiple partition nodes to obtain information.
For significantly increasing data and service requests, a database architecture of a large-scale application system is as follows:
The database architecture includes multiple databases, and data needed by applications is stored in the multiple databases in a partition division manner. The applications separately establish a database connection to the multiple databases. When extension needs to be performed, a quantity of applications and a quantity of databases are scaled up. A total quantity of database connections is a product of the quantity of the applications and the quantity of the databases, a quantity of database connections of a single database is equal to the quantity of the applications, and a quantity of database connections of a single application is equal to the quantity of the databases.
In the foregoing database architecture, a quantity of connections of each database is equal to a quantity of applications (or a quantity of processes) that need to access the database. Because a quantity of database connections is limited, applications cannot be scaled out linearly, and an application occupies a dedicated database connection of each database, resulting in a waste of database connection resources.